$("a").click(function(){
  location.href="注册.html"
})

$("h3").click(function(){
  location.href="注册.html"
})

$("h4").click(function(){
  location.href="注册.html"
})


$("button").click(function(){ 
  var url =denglu 
$.ajax({
  type:"get",
  url:url,
  data:{
    username:$("input").eq(0).val(),
    password:$("input").eq(1).val(),
  },
}).then(function(res){
  let { data } = res;

  // 存数据
 localStorage.setItem("账号",data.username);
   localStorage.setItem("密码",data.password);
   localStorage.setItem("id",data.id);
  alert(res.msg);
  if(res.msg=="登录成功")
  console.log(res)
  location.href="首页.html"
  console.log(data)
  
})
})

